package console

type scalar struct {
	val interface{}
}

func (s *scalar) value() interface{}{
	return s.val
}

func (s *scalar) visit(f nodeVisitor)node{
	return f(s)
}

type list struct {
	values []node
}

func (l *list) visit(f nodeVisitor)node {
	for _, value := range l.values {
		f(value)
	}
	return l
}

type reference struct {
	ref string 
}

func (r *reference)visit(n nodeVisitor)node{
	return n(r)
}

type node interface {
//	value() interface{}
	visit(nodeVisitor)node
}

type appender interface {
	appendTo(node)
}

type nodeVisitor func(node)node

